/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.goodiebag.pinview;

import ohos.agp.components.TextField;

import java.util.ArrayList;
import java.util.List;

public class MyValue {
    /**
     * 所有子视图
     */
    private static List<Pinview> pinviews = new ArrayList<>();
    /**
     * 所有输入框
     */
    private static List<TextField> fields = new ArrayList<>();
    /**
     * 位置
     */
    private static int size = 0;
    /**
     * 行数
     */
    private static int page = 0;
    /**
     * 存储临时输入框
     */
    private static TextField temp = null;

    /***
     * getPinviews
     *
     * @return List<Pinview>
     */
    public static List<Pinview> getPinviews() {
        return pinviews;
    }

    /***
     * getFields
     *
     * @return List<TextField>
     */
    public static List<TextField> getFields() {
        return fields;
    }

    /***
     * getSize
     *
     * @return int
     */
    public static int getSize() {
        return size;
    }

    /***
     * setSize
     */
    public static void setSize(int size) {
        MyValue.size = size;
    }

    /***
     * getPage
     *
     * @return int
     */
    public static int getPage() {
        return page;
    }

    /***
     * setPage
     */
    public static void setPage(int page) {
        MyValue.page = page;
    }

    /***
     * getTemp
     *
     * @return TextField
     */
    public static TextField getTemp() {
        return temp;
    }

    /***
     * setTemp
     */
    public static void setTemp(TextField temp) {
        MyValue.temp = temp;
    }
}
